<?php
if(isset($_GET)){
    include_once 'module/controls.php';
    include_once 'model/user/user_create.php';

    $c = new controls();
    $user = new users();
    $fillOne = $user->FillOneByName($_SESSION);
?>
<div id="content">
    <div class="content_block">
        <h2 class="jquery_tab_title"><?php echo $phrase["profile"] ?></h2>
        <form method="post" action="<?=$url["home"] ?>/menu/process">
            <p>
                <?php echo $c->get_textHidden("id", $fillOne["user_id"]) ?>
                <?php echo $c->get_label($phrase["fullname"]) ?>
                <?php echo $c->get_text("fullname", $fillOne["user_fullname"]) ?>
                <span id="error_email"></span>
            </p>
            
            <p>
                <?php echo $c->get_label($phrase["email"]) ?>
                <?php echo $c->get_text("email", $fillOne["user_email"]) ?>
                <span id="error_email"></span>
            </p>

            <p>
                <?php echo $c->get_label($phrase["phone"]) ?>
                <?php echo $c->get_text("phone", $fillOne["user_phone"]) ?>
            </p>
            
            <p>
                <a class="link1" href="<?=$url["home"] ?>/menu/changepass/id/<?php echo $fillOne["user_id"] ?>"><?php echo $phrase["changepass"] ?></a>
            </p>
            
            <p>
                <?php echo $c->get_button("updatebyname",$phrase["update"]) ?>
            </p>
        </form>
    </div>
</div>
<script>
    $("#username").keydown(function(e){
        if(e.keyCode == "32"){
            return false;
        }
    });
    
    $(document).ready(function(){
        $('#username').keyup(username_check);
        $('#password').keyup(remove_mgs);
        $('#cpassword').keyup(remove_mgs);
        $('#phone').keyup(remove_mgs);
        $('#email').keyup(remove_mgs);
        $('#fullname').keyup(remove_mgs);
        $('.button').click(checkuser);
        $("#phone").keydown(isNumbericOnly);
    });
</script>
<?php } ?>